package com.juzi.wopu.query;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;

public class OrderJingCaiQuery extends BaseQuery{
	private String mobile;
	
	private Date beginDate;
	
	private Date endDate;
	
	private Long companyCode;

	public OrderJingCaiQuery() {
		super("OrderJingCai");
	}
	
	@Override
	protected void addWhere() {
		if (StringUtils.isNotBlank(mobile)) {
			AddWhere("o.sUserNo like ?", "%" + mobile + "%");
		}
		
		if(beginDate!=null && endDate!=null){
			AddWhere("o.dtInsert > ? and o.dtInsert < ?", beginDate, endDate);
		}
		
		if (companyCode!=null) {
			AddWhere("o.iCompany = ?", companyCode);
		}
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Long getCompanyCode() {
		return companyCode;
	}

	public void setCompanyCode(Long companyCode) {
		this.companyCode = companyCode;
	}
}
